Skip to content

docs(events): document the exposure flags bitmask - #278

Merged
calthejuggler merged 3 commits into
masterfrom
docs/events-flags-column
Jul 14, 2026
Merged

docs(events): document the exposure flags bitmask#278
calthejuggler merged 3 commits into
masterfrom
docs/events-flags-column

Conversation

@calthejuggler

@calthejuggler calthejuggler commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

What

Documents the exposure flags column so customers analysing exported event data can tell a real participant apart from a bot, an ineligible visitor, or an overridden assignment.

Why

A customer exported their experiment data and their numbers didn't match the UI: more participants than reported, and some units appeared on both variants. Root cause was ignoring the flags column, which the UI applies for you but a raw export does not.

Changes

  • exposure-events.mdx — new "The flags field" section: the full bit map, a worked read-a-value example, and the (flags & 207) = 3 participant filter that matches the UI's count. Reworked the info/warning table with a Trigger column mapping each label to its flag bit (or to experiment_id for the one non-flag label).
  • downloading-events.mdx — cross-link callout pointing export users at the flags section.

Sourcing notes

  • Bit values verified against inserter/.../EventForwardingManager.java (where the mask is built).
  • Participant filter verified against lib/analytics/.../EventUtils.getEffectiveExposureFilter.
  • Rule-override (256) is beta-SDK-only today; the 207 mask query works identically whether or not that bit is present, so no version fork is needed in the docs.

Not done

  • yarn build not run — MDX anchor rendering unverified.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added clearer upfront guidance that the flags column is required for events-page (raw) exports to correctly distinguish real participants from all ingested exposures.
    • Clarified the difference between experiment-overview exports (already filtered) and events-page exports (raw, including non-participants).
    • Expanded the flags documentation with a full bitmask definition, bit-by-bit meanings, interpretation examples, and the exact conditions used by the web console for participant counts.
    • Reworked the warning/info mapping to show how labels are triggered from flags (including the experiment-not-running case).

@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for absmartly-docs ready!

Name Link
🔨 Latest commit f52e5ab
🔍 Latest deploy log https://app.netlify.com/projects/absmartly-docs/deploys/6a562f8a8bc9a30007dc557d
😎 Deploy Preview https://deploy-preview-278--absmartly-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7c2e0601-39df-47db-a71c-320f36826659

📥 Commits

Reviewing files that changed from the base of the PR and between 439de55 and f52e5ab.

📒 Files selected for processing (2)
  • docs/web-console-docs/Events/downloading-events.mdx
  • docs/web-console-docs/Events/exposure-events.mdx
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/web-console-docs/Events/downloading-events.mdx
  • docs/web-console-docs/Events/exposure-events.mdx

Walkthrough

The documentation explains the exported flags bitmask, its individual conditions, example interpretations, and the masking logic used to reproduce participant counts. It adds a SQL example and documents inclusion and exclusion rules. The events guidance maps flag conditions to warning and information labels, while the downloading-events page distinguishes filtered experiment-overview exports from raw Events-page exports.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: bmsilva, mario-silva, marcio-absmartly

Poem

A rabbit read the flags with care,
Through bits and exports everywhere.
“Count true participants, don’t guess—”
Said Bun, “the mask will sort the mess!”
Then warnings hopped into the guide.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarises the main change: documenting the exposure flags bitmask in the events docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/events-flags-column

Comment @coderabbitai help to get the list of available commands.

@calthejuggler
calthejuggler marked this pull request as ready for review July 14, 2026 12:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/web-console-docs/Events/downloading-events.mdx`:
- Around line 12-16: Update the note under “Check the flags column before you
analyse exposures” to qualify exported data by the selected export scope: state
that it includes every matching exposure within that scope, including
non-participants. Preserve the existing guidance about using the flags field to
identify real participants.

In `@docs/web-console-docs/Events/exposure-events.mdx`:
- Line 177: Update the exposure-event documentation table entry to state that
traffic allocation was “< 100%”, matching the earlier wording and clearly
expressing the percentage threshold.
- Around line 157-162: Update the participant-count SQL example to avoid merging
identical unit_uid values across dimensions: either explicitly state that the
query is pre-filtered to a single experiment and unit_type, or count distinct
experiment and unit_type together with unit_uid. Preserve the existing exposure
flag filter and UI-count intent.
- Around line 133-134: Update the documentation for flag 256 across the bit
table, trigger table, and explanatory text to state that rule-override behavior
applies only to beta SDKs. Clarify that this beta-SDK-specific flag is not
universal and preserve the correct statement about whether the SDK sets the
assigned bit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8ddbca47-897a-43fb-ad75-3721ef8f50d7

📥 Commits

Reviewing files that changed from the base of the PR and between 0ed48e7 and 77daa1d.

📒 Files selected for processing (2)
  • docs/web-console-docs/Events/downloading-events.mdx
  • docs/web-console-docs/Events/exposure-events.mdx

Comment thread docs/web-console-docs/Events/downloading-events.mdx Outdated
Comment thread docs/web-console-docs/Events/exposure-events.mdx
Comment thread docs/web-console-docs/Events/exposure-events.mdx
Comment thread docs/web-console-docs/Events/exposure-events.mdx
@calthejuggler
calthejuggler force-pushed the docs/events-flags-column branch from da72fdb to fed4c62 Compare July 14, 2026 12:33
@calthejuggler
calthejuggler force-pushed the docs/events-flags-column branch from 439de55 to f52e5ab Compare July 14, 2026 12:46
@calthejuggler
calthejuggler merged commit 76709be into master Jul 14, 2026
6 checks passed
@calthejuggler
calthejuggler deleted the docs/events-flags-column branch July 14, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant